<form class="layui-form layui-card" action="{:request()->url()}" data-auto="true" method="post" autocomplete="off">
    <div class="layui-card-body">
        <div class="layui-form-item">
            <label class="layui-form-label">图片类型</label>
            <div class="layui-input-block">
                <select class="layui-select" name="type" lay-filter="college_id" id="college_id" required lay-search>
                    <option selected value="">请图片类型</option>
                    {foreach $type as $key => $type}
                    {if isset($vo.type) and $vo.type eq $key}
                    <option selected value="{$key}">{$type}</option>
                    {else}
                    <option value="{$key}">{$type}</option>
                    {/if}
                    {/foreach}
                </select>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">名称（可不填）</label>
            <div class="layui-input-block">
                <input name="name" value='{$vo.name|default=""}' placeholder="请输入名称" class="layui-input">
                <!--{/if}-->
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">排序</label>
            <div class="layui-input-block">
                <input name="sort" value='{$vo.sort|default=""}' placeholder="请输入排序" class="layui-input">
                <span style="color: red">数字越大越靠前</span>
                <!--{/if}-->
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label label-required">图片链接</label>
            <div class="layui-input-block">
                <input name="url" value='{$vo.url|default=""}' placeholder="请输入链接" class="layui-input">
                <!--{/if}-->
                <span style="color: red">活动链接: /pages/product/index?id= <a href="/#/activity/index/index.html?spm=m-59-60-61" target="_blank">查看活动ID</a></span>
                <br>
                <span style="color: red">商品链接: /pages/product/index?id= <a href="/#/store/goods/index.html?spm=m-13-48-14" target="_blank">查看商品ID</a></span>
                <br>
                <span style="color: red">商城分类链接: /pages/category/category</span>
                <br>
                <span style="color: red">活动筛选链接:
                    /pages/search/select?cityGroup=1（国内）
                    /pages/search/select?cityGroup=2(海外)
                    /pages/search/select?cateId=0(活动分类)
                    <br>
                    {php}print_r(config('data.activity_type'));{/php}
                </span>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label label-required">图片</label>
            <div class="layui-input-block">
                <input name="pic" type="hidden" value="{$vo.pic|default=''}">
                <!--{/if}-->
                <span style="color: red">默认比列：250x110</span>
            </div>
            <script>$('[name="pic"]').uploadOneImage()</script>
        </div>
    </div>
    <div class="hr-line-dashed"></div>
    <div class="layui-form-item text-center">
        {notempty name='vo.id'}<input type='hidden' value='{$vo.id}' name='id'>{/notempty}
        <button class="layui-btn" type='submit'>保存数据</button>
        <button class="layui-btn layui-btn-danger" type='button' data-confirm="确定要取消编辑吗？" data-close>取消编辑</button>
    </div>
    <script>
        window.form.render();
    </script>
</form>
